package com.zpark.it.controller;

import com.zpark.it.pojo.Product;
import com.zpark.it.service.ProductService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * @Title: ProductSearchController 搜索服务调用的controller
 * @Author Charles
 * @Package com.zpark.it.controller
 * @Date 2023/7/23 11:32
 */
@RestController
@RequestMapping("product")
public class ProductSearchController {

    @Autowired
    private ProductService productService;

    @GetMapping  ("list")
    public List<Product> allList(){

        return productService.allList();
    }
}
